/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package lab3serveurhttp;

/**
 *
 * @author Mathieu
 */
public enum HTTPState
{
    OK(200,"OK"),
    CREATED(201,"CREATED"),
    ACCEPTED(202,"ACCEPTED"),
    PARTIAL_INFORMATION(203,"PARTIAL INFORMATION"),
    NO_RESPONSE(204, "NO RESPONSE"),
    RESET_CONTENT(205, "RESET CONTENT"),
    PARTIAL_CONTENT(206, "PARTIAL CONTENT"),
    MOVED(301, "MOVED"),
    FOUND(302, "FOUND"),
    METHOD(303, "METHOD"),
    NOT_MODIFIED(304, "NOT MODIFIED"),
    BAD_REQUEST(400, "BAD REQUEST"),
    UNAUTHORIZED(401, "UNAUTHORIZED"),
    PAYMENT_REQUIRED(402, "PAYMENT REQUIRED"),
    FORBIDDEN(403, "FORBIDDEN"),
    NOT_FOUND(404, "NOT FOUND"),
    INTERNAL_ERROR(500, "INTERNAL ERROR"),
    NOT_IMPLEMENTED(501, "NOT IMPLEMENTED"),
    BAD_GATEWAY(502, "BAD GATEWAY"),
    SERVICE_UNAVAILABLE(503, "SERVICE UNAVAILABLE"),
    GATEWAY_TIMEOUT(504, "GATEWAY TIMEOUT");        

    private final int value;
    private final String strValue;

    private HTTPState(int value, String strValue) 
    {
        this.value = value;
        this.strValue = strValue;
    }

    public int getValue ( )
    {
        return this.value;
    }

    @Override
    public String toString ( )
    {
        return this.strValue;
    }
};
